﻿using System.Net.Http.Headers;

namespace Grow.Rest.Http
{
    public class RestClientResponse : IRestClientResponse
    {
        private readonly HttpResponseHeaders _httpResponseHeaders;
        public RestClientResponse(HttpResponseHeaders httpResponseHeaders)
        {
            _httpResponseHeaders = httpResponseHeaders;
        }

        public IEnumerable<string> GetValues(string name)
        {
            return _httpResponseHeaders.GetValues(name);
        }
    }

    public class RestClientResponse<TData> : RestClientResponse, IRestClientResponse<TData>
    {
        private readonly HttpResponseHeaders _httpResponseHeaders;
        public RestClientResponse(TData? data, HttpResponseHeaders httpResponseHeaders) : base(httpResponseHeaders)
        {
            Data = data;
            _httpResponseHeaders = httpResponseHeaders;

        }

        public TData? Data { get; }


    }
}
